home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 2 / LSD and 17bit Compendium Deluxe - Volume II.iso / a / prog / asmsrc / tango2.lha / SOURCES / uggh.s < prev   
Encoding:
Text File  |  1987-06-11  |  20.2 KB  |  1,000 lines

  1. ; ** 2 PIXEL ACCURACY SINE WAVE BY TANGO OF CRYPTIC **
  2. ;     ** ONLY SPREAD SOURCE TO CRYPTIC MEMBERS **
  3.  
  4.     opt c-
  5.     section blitter,code_c            Chip Ram please !!
  6.     include    df0:definitions            Give me some hardware reggies
  7.     include    df0:macros                Give me some macros
  8.     
  9.         
  10. ;LOCAL CONSTANTS
  11.  
  12. icra        equ $bfed01                
  13. allocmem     =-30-168                
  14. freemem     =-30-180                
  15. fontmemory    =4000
  16.  
  17. TAKEOVER:
  18.         
  19.     LEA custom,a5        
  20.     LEA GFXLIB(PC),a1             Point to 'graphics.library'
  21.     MOVEQ #0,D0                     Doesn't matter which version
  22.      MOVE.L 4.w,a6                 EXECBASE
  23.     jsr    -132(a6)                 task switching off (forbid)
  24.      JSR -$228(a6)                  Openlibrary
  25.      MOVE.L D0,GFXBASE             Store library address
  26.     jsr    Cryptic_init
  27.         
  28. ;Now put the graphic addresses in the CopperList         
  29.  
  30.  
  31.      move.l    #sprite,d1            
  32.      move.w    d1,sp0lo+2
  33.      swap    d1
  34.      move.w    d1,sp0hi+2
  35.  
  36.  
  37.      move.l GFXBASE,d0            Move gfxbase offset to d0
  38.      MOVE.L D0,A6                
  39.      MOVE.W #$80,dmacon(a5)        Turn off copper whilst changing it
  40.      MOVE.L $32(A6),WBCOPPER         Store old (WBench) copper address
  41.      MOVE.L #OURCOPPER,$32(A6)    Point to new copper list (our own)
  42.      MOVE.W #$8080,dmacon(a5)    re-enable copper
  43.  
  44.      MOVE.W #$8010,intena(a5)        
  45.      MOVE.L $6c,old                Save work bench interrupt
  46.      MOVE.L #LEV3,$6c            This sets up a level 3 interrupt
  47.     move.w    intenar(a5),systemints
  48.     move.b    #%01111111,icra        Kill keyboard
  49.         
  50. WAIT:     
  51.     BTST #6,$BFE001                This waits for the left
  52.      BNE.S    WAIT                mouse button to be pressed
  53.     move.l    4.w,a6                EXECBASE
  54.      MOVE.L old,$6c                Restore system interrupts
  55.     MOVE.L GFXBASE,A6
  56.      MOVE.W #$80,dmacon(a5)        Disable DMA
  57.      MOVE.L WBCOPPER,$32(A6)        Restore old copperlist
  58.      MOVE.W #$8080,dmacon(a5)    Enable DMA
  59.      move.w    systemints,d0        Systems interrupt
  60.      or.w    #$c000,d0
  61.      move.w    d0,intena(a5)        Enable OS interrupts
  62.      move.b    #%10011011,icra        Enable keyboard
  63.     clr.w    $dff0a8                Clear music
  64.     clr.w    $dff0b8
  65.     clr.w    $dff0c8
  66.     clr.w    $dff0d8
  67.     move.w    #$f,$dff096
  68.     CLR.L    D0
  69.     rts
  70.  
  71.  
  72. ERROR:    
  73.     move.l 4.w,a6                Get EXECBASE
  74.     jsr    -138(a6)                Permit ( multi-tasking on )
  75.     moveq    #0,d0                Clear d0
  76.      RTS                            Return to AmigaDOS
  77.  
  78.  
  79. ;This is the NEW level 3 interrupt
  80.  
  81. LEV3:
  82.      MOVEM.L d0-d7/a0-a6,-(sp)    Save all registers to the stack
  83.     lea    custom,a5
  84.     AND #$10,intreqr(a5)           Check if interrupt is from Copper 
  85.     BNE out
  86.     move.w    #$8010,$9c                                
  87.     
  88.     bsr    try_sin
  89.     bsr    testscroll
  90.  
  91.      move.l    sin_screen,d1        Bitplane memory address
  92.     move.w    d1,bp1lo+2
  93.      swap    d1
  94.      move.w    d1,bp1hi+2
  95.     bsr        move_stars
  96.     bsr        equalizers
  97.     bsr    Cryptic_music
  98.     
  99. out:     
  100.     MOVEM.L (sp)+,d0-d7/a0-a6    Restore the registers
  101.     DC.W $4ef9                    hex value for  JMP instruction
  102. old:     
  103.     DC.L 0                        will jump to normal interrupt
  104.  
  105.  
  106. equalizers:
  107.     clr.l    d2
  108.     move.w    Cryptic_aud1temp,d2
  109.     and.w    #$f00,d2
  110.     move.w    d2,eq1+2
  111.  
  112.     clr.l    d2
  113.     move.w    Cryptic_aud2temp,d2
  114.     and.w    #$ff0,d2
  115.     ror.w    #4,d2
  116.     move.w    d2,eq2+2
  117.  
  118.     clr.l    d2
  119.     move.w    Cryptic_aud3temp,d2
  120.     and.w    #$0f0,d2
  121.     move.w    d2,eq3+2
  122.  
  123.     clr.l    d2
  124.     move.w    Cryptic_aud4temp,d2
  125.     and.w    #$00f,d2
  126.     move.w    d2,eq4+2
  127.     rts
  128.  
  129. ; ** Move the sprites **
  130.  
  131. move_stars:
  132.  
  133.     sub.b    #$1,x+1
  134.     sub.b    #$2,x+9
  135.     sub.b    #$1,x+17
  136.     sub.b    #$3,x+25
  137.     sub.b    #$2,x+33
  138.     sub.b    #$4,x+41
  139.     sub.b    #$2,x+49
  140.     sub.b    #$1,x+57
  141.     sub.b    #$3,x+65
  142.     sub.b    #$1,x+73
  143.     sub.b    #$2,x+81
  144.     sub.b    #$4,x+89
  145.     sub.b    #$3,x+97
  146.     sub.b    #$2,x+105
  147.     sub.b    #$1,x+113
  148.     sub.b    #$4,x+121
  149.     sub.b    #$3,x+129
  150.     sub.b    #$3,x+137
  151.     sub.b    #$2,x+145
  152.     sub.b    #$4,x+153
  153.     sub.b    #$1,x+161
  154.     sub.b    #$3,x+169
  155.     sub.b    #$1,x+177
  156.     sub.b    #$2,x+185
  157.     sub.b    #$4,x+193
  158.     sub.b    #$1,x+201
  159.     sub.b    #$3,x+209
  160.     sub.b    #$1,x+217
  161.     sub.b    #$2,x+225
  162.     sub.b    #$2,x+233
  163.     rts
  164.  
  165.  
  166.  
  167.  
  168. ; ** Double Buffer The Screen **
  169.  
  170. Buff:
  171.     Eor.l    #10240,Tango
  172.     Move.l    Tango,D1
  173.     Move.l    #SinePlane,d2
  174.     Add.l    D1,d2
  175.     Move.l    D2,Sin_Screen
  176.     Rts
  177.  
  178.  
  179. ; ** THE SCROLL ROUTINE **
  180.  
  181. testscroll:
  182.     tst.l    stopper
  183.     beq.s    scroll
  184.     sub.l    #1,stopper
  185.     rts
  186. scroll:
  187.     cmp.l    #15*4,val                Blitshifted all <<<
  188.     blo.s    coarse_scroll_it        No then get doing it !!
  189.     bsr        blit_char                Blit letter to screen
  190.     clr.l    val                        Reset index
  191. coarse_scroll_it:
  192.     bsr        coarse                    Scroll all line
  193.     rts                            
  194.     
  195.     
  196. ; ** BLIT LETTER ON THE SCREEN **
  197.  
  198. blit_char
  199.     jsr        text
  200.     lea        custom,a5                Get custom chip address
  201.     move.l    screenx,a0                 Can~t see this picture !!
  202.     move.l    #font,a1                 Put font in blitter source
  203.     add.l    d1,a1
  204. blit_test:
  205.     btst    #14,$dff002                 Blitter busy !!!
  206.     bne    blit_test                     Lets wait till she finishes !
  207.     move.w    #$ffff,bltafwm(a5)        Mask (DON'T NEED ONE)
  208.     move.w    #$ffff,bltalwm(a5)        Mask (DON'T NEED ONE)
  209.     move.l    a0,bltdpth(a5)             Blitter dest D (BOTTOM OF SCREEN)
  210.     move.l    a1,bltapth(a5)             Blitter source A (SCROLLING FONT)
  211.     move.w    #38,bltamod(a5)             Modulo (20-1)*2
  212.     move.w    #38,bltdmod(a5)             Modulo (20-1)*2
  213.     move.w    #$9f0,bltcon0(a5)         Minterms D=A
  214.     clr.w    bltcon1(a5)                 Set Ascending mode
  215.      move.w    #16*64+1,bltsize(a5)     Blit size (SIZE OF FONT)
  216.     rts                                  Return
  217.  
  218.  
  219. ; ** BLITSHIFT THE ENTIRE SCROLL LINE (BETTER THAN USING THE HARDWARE).
  220.  
  221. coarse:
  222.     lea        custom,a5                 
  223.     move.l    screenx,a0                ; Can~t see this picture !!
  224.     move.l    a0,a1
  225.     add.l    #2,a1
  226. blit_wait:
  227.     btst    #14,$dff002            
  228.     bne        blit_wait
  229.     incl    #4,val                    ; (1 for slower)
  230.     move    #15,d7                    ; Amount of pixels to shift(15 for slow)
  231.     ror        #4,d7                    ; Set to correct bits (12-15)
  232.     or        #%100111110000,d7        
  233.     move.l    #-1,bltafwm(a5)
  234.     move.l    a1,bltapth(a5)
  235.     move.l    a0,bltdpth(a5)
  236.     move.w    #0,bltamod(a5)
  237.     move.w    #0,bltdmod(a5)
  238.     move.w    d7,bltcon0(a5)    
  239.     move.w    #80*64+20,bltsize(a5)
  240.     rts    
  241.  
  242.  
  243. ; ** BLITTER CLEAR WHERE THE SINE SCROLL HAS JUST BEEN **
  244.  
  245. CLEAR:
  246.     Move.l    Sin_Screen,a0
  247. wate
  248.     btst    #14,$dff002
  249.     bne.s    wate
  250.     Move.l    a0,Bltdpth(a5)
  251.     Move    #0,Bltdmod(a5)
  252.     Move.l    #$1f00000,Bltcon0(a5)
  253.     Move    #150*64+20,Bltsize(a5)
  254.     Rts
  255.  
  256.  
  257. try_sin:
  258.     Bsr        buff
  259.     bsr        clear
  260.     Move.l    Table1,A3
  261.     Move.b    (A3),d1
  262.     Cmp.b    #$ff,d1
  263.     Bne        ItsOkYa
  264.     Move.l    #SinTab,A3
  265. ItsOkYa
  266.     Add.l    hi_amplitude,A3
  267.     Move.l    a3,Table1
  268.     Move.l    A3,Table
  269.     lea        custom,a5                 
  270.     move.l    screenx,a0                 ; Source A
  271.     move.l    #20,d4                    ; Number of chars along screen
  272.     clr.l    d5
  273.     clr.l    d6
  274. ban:
  275.     move.w    #%1100000000000000,d3
  276.     move.l    #7,d2
  277. blit_test0:
  278.     btst    #14,$dff002                 
  279.     bne    blit_test0                     
  280.     move.l    sin_screen,a1
  281.     bsr        get_sinvalue
  282.     move.w    d3,bltafwm(a5)        
  283.     move.w    d3,bltalwm(a5)        
  284.     move.l    a1,bltdpth(a5)             
  285.     move.l    a1,bltbpth(a5)             
  286.     move.l    a0,bltapth(a5)             
  287.     move.w    #38,bltamod(a5)             
  288.     move.w    #38,bltdmod(a5)             
  289.     move.w    #38,bltbmod(a5)             
  290.     move.w    #$dfc,bltcon0(a5)         
  291.     clr.w    bltcon1(a5)                 
  292.      move.w    #16*64+1,bltsize(a5)     
  293.     lsr.w    #2,d3
  294.     dbf        d2,blit_test0
  295.     add.l    #2,a0                    ; Get next letter along
  296.     add.l    #2,d6
  297.     dbf        d4,ban
  298.     rts                                  
  299.  
  300. get_sinvalue:
  301.     Clr.l    D5
  302.     Move.l    Table,A3
  303.     Move.b    (A3),d5
  304.     cmp.b    #$ff,d5
  305.     bne        aslam
  306.     Move.l    #SinTab,A3
  307.     Move.b    (a3),d5
  308. Aslam
  309.     Add.l    lo_amplitude,A3
  310.     Move.l    A3,Table
  311.     mulu    #40,d5
  312.     add.l    d5,a1
  313.     Add.l    D6,A1
  314.     rts
  315. Table1:    Dc.l    SinTab    
  316. table:    dc.l    sintab
  317. sintab:
  318.     dc.b $3C,$3F,$42,$46,$49,$4C,$50,$53,$56,$59
  319.     dc.b $5C,$5F,$61,$64,$67,$69,$6B,$6D,$6F,$71
  320.     dc.b $72,$73,$75,$76,$76,$77,$77,$77,$77,$77
  321.     dc.b $77,$76,$76,$75,$73,$72,$71,$6F,$6D,$6B
  322.     dc.b $69,$67,$64,$61,$5F,$5C,$59,$56,$53,$50
  323.     dc.b $4C,$49,$46,$42,$3F,$3C,$38,$35,$31,$2E
  324.     dc.b $2B,$27,$24,$21,$1E,$1B,$18,$16,$13,$10
  325.     dc.b $E,$C,$A,$8,$6,$5,$4,$2,$1,$1
  326.     dc.b $0,$0,$0,$0,$0,$0,$1,$1,$2,$4
  327.     dc.b $5,$6,$8,$A,$C,$E,$10,$13,$16,$18
  328.     dc.b $1B,$1E,$21,$24,$27,$2B,$2E,$31,$35
  329.     dc.b $38,255
  330.      EVEN
  331.      
  332.  
  333. ; ** CHARACTER DECODER ROUTINE **
  334.  
  335. text:
  336.     move.l    acurent,a2                Get message
  337.     clr.l    d1                        
  338.     move.b    (a2)+,d1                Update it
  339.     move.b    d1,letter                Store in offset
  340.     cmp.b    #255,d1                    Check for end of message
  341.     beq.w    rst_text                If equal, then reset
  342.     cmp.b    #254,d1
  343.     beq        stop
  344.     sub.l    #32,d1                    Subract 32 (ie space)
  345.     asl        d1                        Times by 2 
  346.     move.l    a2,acurent                Update acurent
  347.     CMP.B    #"4",letter                Is letter "K" or larger
  348.     BPL.s    add_more                If larger then add on
  349.     rts                                Return
  350. add_more:
  351.     CMP.B    #"H",letter                Is letter "U" or larger
  352.     BPL.S    add_more2                If larger then add on
  353.     add.l    #40*15,d1                Get next line down (KLMNOPQRST)
  354.     rts
  355. add_more2:                    
  356.     add.l    #40*30,d1                Get next line down (UVWXYZ0123)
  357.     rts
  358. rst_text:
  359.     move.l    #0,d1
  360.     move.l    #message,d2                Get begining of text
  361.     move.l    d2,acurent                Reset to begining
  362.     rts                                Return
  363. stop:
  364.     move.l    #0,d1
  365.     add.l    #1,acurent
  366.     move.l    #150,stopper
  367.     rts
  368.  
  369. message:
  370.  
  371. ; 254=STOP,255=END.
  372.  
  373.     DC.B    "  CRYPTIC ARE BACK WITH ANOTHER COMP THIS TIME BROUGHT TO"
  374.     DC.B    " YOU BY TANGO AND DONATELLO OF CRYPTIC"
  375.     DC.B    " QUICK CREDITS GO TO CODING BY    "
  376.     DC.B    "     TANGO        ",254
  377.     DC.B    " MUSIC COMPOSED BY     "
  378.     DC.B    "  DONATELLO      ",254,"       "
  379.     DC.B    "  PERSONAL GREETZ FROM TANGO GO TO ........"
  380.     DC.B    "      GRAEME OF ANNIHILATORS (KEEP SENDING FAST MATE)      MR PRACTICE (I'LL SEND YOU MY LIST SOON MATE)       EBONY (HOPE YOU ENJOYED YOUR HOLS)"
  381.     DC.B    "     R-TYME (WE'LL HAVE A LAUGH IN BLACKPOOL WITH ALL THE OTHER CRYPTIC MEMBERS)"
  382.     DC.B    "     PERSONAL GREETZ FROM DONATELLO GO TO ......      "
  383.     DC.B    " SHUI (HOW DID YOU LIKE THE LAST PACKAGE!!!!),CLAIRVOYANT(NICE PACKAGE!!)"
  384.     DC.B    "  BRAINWAVE YOU FUCKIN LAME TWAT FUCK YOU AND YOUR BIRD IN SOUTHPORT!!!!!!    "
  385.     DC.B    " KISS MY ARSE!!!   HI TO PETE OF AVENGER!!!  ALSO A BIG FUCKOFF TO STEVE LEA YOU FUCKIN LAME BASTARD(YOUR SLOW AS FUCK)!!"
  386.     DC.B    "     CRYPTIC MEGA HOT COOL SIZZLING GREETZ TO ALL THESE COOL GUYZ.......       "
  387.     DC.B    " ACETEAM  ACIDFORCE  ACCUMULATORS  ADEPT  ALLIGATA  ANARCHY  APEX  ARMARDA ICELAND  AUTOMATION  BURNING INDEPENDENCE  CADCAM  CINEFEX  CONTEX  CRYPT  CRYPTOBURNERS  CYCRON  D-MOB "
  388.     DC.B    " DEAD HACK  DEFJAM-CCS  DEXION  DIGITECH  DOOM  EXTREME  FLASH PRODUCTIONS  FRAXION  FUSION  GATE  HACKTRICK  HYPNOSIS  IMMORTAL  IPEC ELITE  LEVEL 4  MAGNETIC FIELDS "
  389.     DC.B    " MAYHEM  MEGADETH  MIGHTY DRUIDS  MIRACLE  MIRAGE U.K.  NO LIMITS  PENDLE EUROPA # P.O.P. POSSE  POWERLORDS U.K.  POWERLORDS SWEDEN  PROLOGIC  PUSSY  QUARTEX  REBELS  RED SECTOR-TCC  RUBIDIUM  SCIENCE 451 "
  390.     DC.B    "  SCOOPEX AUSTRIA  SILENTS U.K.  SILENTS NORWAY  SLIPSTREAM  SUBWAY  SYNCHRONOUS  THE GIANTS  THE HACKING RELATION  TIMELORDS  TRIAX  T.W.A.T."
  391.     DC.B    " UNTOUCHABLES  WARFALCONS  WIZZCAT  W.W.F..........     BYE BYE         WRAP             ",255
  392.     EVEN
  393.  
  394.  
  395.  
  396. ;                **********************************************
  397. ;                ** THE MUZAX PLAY ROUTINE FOR NOISE TRACKER ** 
  398. ;                  ******************************************
  399.  
  400.  
  401. MUZAX:
  402.  
  403.     jsr    Cryptic_init
  404.  
  405. end:    rts
  406. Cryptic_init:
  407.     lea    Cryptic_data,a0
  408.     add.l    #$03b8,a0
  409.     moveq    #$7f,d0
  410.     moveq    #0,d1
  411. Cryptic_init1:
  412.     move.l    d1,d2
  413.     subq.w    #1,d0
  414. Cryptic_init2:
  415.     move.b    (a0)+,d1
  416.     cmp.b    d2,d1
  417.     bgt.s    Cryptic_init1
  418.     dbf        d0,Cryptic_init2
  419.     addq.b    #1,d2
  420. Cryptic_init3:
  421.     lea        Cryptic_data,a0
  422.     lea        Cryptic_sample1(pc),a1
  423.     asl.l    #8,d2
  424.     asl.l    #2,d2
  425.     add.l    #$438,d2
  426.     add.l    a0,d2
  427.     moveq    #$1e,d0
  428. Cryptic_init4:
  429.     move.l    d2,(a1)+
  430.     moveq    #0,d1
  431.     move.w    42(a0),d1
  432.     asl.l    #1,d1
  433.     add.l    d1,d2
  434.     add.l    #$1e,a0
  435.     dbf        d0,Cryptic_init4
  436.     lea        Cryptic_sample1(PC),a0
  437.     moveq    #0,d0
  438. Cryptic_clear:
  439.     move.l    (a0,d0.w),a1
  440.     clr.l    (a1)
  441.     addq.w    #4,d0
  442.     cmp.w    #$7c,d0
  443.     bne.s    Cryptic_clear
  444.     clr.w    $dff0a8
  445.     clr.w    $dff0b8
  446.     clr.w    $dff0c8
  447.     clr.w    $dff0d8
  448.     clr.l    Cryptic_partnrplay
  449.     clr.l    Cryptic_partnote
  450.     clr.l    Cryptic_partpoint
  451.     move.b    Cryptic_data+$3b6,Cryptic_maxpart+1
  452.     rts
  453.     rts
  454. Cryptic_music:
  455.     addq.w    #1,Cryptic_counter
  456. Cryptic_cool:
  457.     cmp.w    #6,Cryptic_counter
  458.     bne.s    Cryptic_notsix
  459.     clr.w    Cryptic_counter
  460.     bra        Cryptic_rout2
  461. Cryptic_notsix:
  462.     lea        Cryptic_aud1temp(PC),a6
  463.     tst.b    3(a6)
  464.     beq.s    Cryptic_arp1
  465.     lea        $dff0a0,a5        
  466.     bsr.s    Cryptic_arprout
  467. Cryptic_arp1:
  468.     lea    Cryptic_aud2temp(PC),a6
  469.     tst.b    3(a6)
  470.     beq.s    Cryptic_arp2
  471.     lea        $dff0b0,a5
  472.     bsr.s    Cryptic_arprout
  473. Cryptic_arp2:
  474.     lea        Cryptic_aud3temp(PC),a6
  475.     tst.b    3(a6)
  476.     beq.s    Cryptic_arp3
  477.     lea        $dff0c0,a5
  478.     bsr.s    Cryptic_arprout
  479. Cryptic_arp3:
  480.     lea        Cryptic_aud4temp(PC),a6
  481.     tst.b    3(a6)
  482.     beq.s    Cryptic_arp4
  483.     lea        $dff0d0,a5
  484.     bra.s    Cryptic_arprout
  485. Cryptic_arp4:
  486.     rts
  487. Cryptic_arprout:
  488.     move.b    2(a6),d0
  489.     and.b    #$0f,d0
  490.     tst.b    d0
  491.     beq        Cryptic_arpegrt
  492.     cmp.b    #$01,d0
  493.     beq.s    Cryptic_portup
  494.     cmp.b    #$02,d0
  495.     beq.s    Cryptic_portdwn
  496.     cmp.b    #$0a,d0
  497.     beq.s    Cryptic_volslide
  498.     rts
  499. Cryptic_portup:
  500.     moveq    #0,d0
  501.     move.b    3(a6),d0
  502.     sub.w    d0,22(a6)
  503.     cmp.w    #$71,22(a6)
  504.     bpl.s    Cryptic_ok1
  505.     move.w    #$71,22(a6)
  506. Cryptic_ok1:    
  507.     move.w    22(a6),6(a5)
  508.     rts
  509. Cryptic_portdwn:
  510.     moveq    #0,d0
  511.     move.b    3(a6),d0
  512.     add.w    d0,22(a6)
  513.     cmp.w    #$538,22(a6)
  514.     bmi.s    Cryptic_ok2
  515.     move.w    #$538,22(a6)
  516. Cryptic_ok2:    
  517.     move.w    22(a6),6(a5)
  518.     rts
  519. Cryptic_volslide:
  520.     moveq    #0,d0
  521.     move.b    3(a6),d0
  522.     lsr.b    #4,d0
  523.     tst.b    d0
  524.     beq.s    Cryptic_voldwn
  525.     add.w    d0,18(a6)
  526.     cmp.w    #64,18(a6)
  527.     bmi.s    Cryptic_ok3
  528.     move.w    #64,18(a6)
  529. Cryptic_ok3:    
  530.     move.w    18(a6),8(a5)
  531.     rts
  532. Cryptic_voldwn:
  533.     moveq    #0,d0
  534.     move.b    3(a6),d0
  535.     and.b    #$0f,d0
  536.     sub.w    d0,18(a6)
  537.     bpl.s    Cryptic_ok4
  538.     clr.w    18(a6)
  539. Cryptic_ok4:    
  540.     move.w    18(a6),8(a5)
  541.     rts
  542. Cryptic_arpegrt:
  543.     move.w    Cryptic_counter(PC),d0
  544.     cmp.w    #1,d0
  545.     beq.s    Cryptic_loop2
  546.     cmp.w    #2,d0
  547.     beq.s    Cryptic_loop3
  548.     cmp.w    #3,d0
  549.     beq.s    Cryptic_loop4
  550.     cmp.w    #4,d0
  551.     beq.s    Cryptic_loop2
  552.     cmp.w    #5,d0
  553.     beq.s    Cryptic_loop3
  554.     rts
  555. Cryptic_loop2:
  556.     moveq    #0,d0
  557.     move.b    3(a6),d0
  558.     lsr.b    #4,d0
  559.     bra.s    Cryptic_cont
  560. Cryptic_loop3:
  561.     moveq    #$00,d0
  562.     move.b    3(a6),d0
  563.     and.b    #$0f,d0
  564.     bra.s    Cryptic_cont
  565. Cryptic_loop4:
  566.     move.w    16(a6),d2
  567.     bra.s    Cryptic_endpart
  568. Cryptic_cont:
  569.     add.w    d0,d0
  570.     moveq    #0,d1
  571.     move.w    16(a6),d1
  572.     and.w    #$fff,d1
  573.     lea        Cryptic_arpeggio(PC),a0
  574. Cryptic_loop5:
  575.     move.w    (a0,d0),d2
  576.     cmp.w    (a0),d1
  577.     beq.s    Cryptic_endpart
  578.     addq.l    #2,a0
  579.     bra.s    Cryptic_loop5
  580. Cryptic_endpart:
  581.     move.w    d2,6(a5)
  582.     rts
  583. Cryptic_rout2:
  584.     lea        Cryptic_data,a0
  585.     move.l    a0,a3
  586.     add.l    #$0c,a3
  587.     move.l    a0,a2
  588.     add.l    #$3b8,a2
  589.     add.l    #$43c,a0
  590.     move.l    Cryptic_partnrplay(PC),d0
  591.     moveq    #0,d1
  592.     move.b    (a2,d0),d1
  593.     asl.l    #8,d1
  594.     asl.l    #2,d1
  595.     add.l    Cryptic_partnote(PC),d1
  596.     move.l    d1,Cryptic_partpoint
  597.     clr.w    Cryptic_dmacon
  598.     lea        $dff0a0,a5
  599.     lea        Cryptic_aud1temp(PC),a6
  600.     bsr        Cryptic_playit
  601.     lea        $dff0b0,a5
  602.     lea        Cryptic_aud2temp(PC),a6
  603.     bsr        Cryptic_playit
  604.     lea        $dff0c0,a5
  605.     lea        Cryptic_aud3temp(PC),a6
  606.     bsr        Cryptic_playit
  607.     lea        $dff0d0,a5
  608.     lea        Cryptic_aud4temp(PC),a6
  609.     bsr        Cryptic_playit
  610.     move.w    #$01f4,d0
  611. Cryptic_rls:    
  612.     dbf        d0,Cryptic_rls
  613.     move.w    #$8000,d0
  614.     or.w    Cryptic_dmacon,d0
  615.     move.w    d0,$dff096
  616.     lea        Cryptic_aud4temp(PC),a6
  617.     cmp.w    #1,14(a6)
  618.     bne.s    Cryptic_voice3
  619.     move.l    10(a6),$dff0d0
  620.     move.w    #1,$dff0d4
  621. Cryptic_voice3:
  622.     lea        Cryptic_aud3temp(PC),a6
  623.     cmp.w    #1,14(a6)
  624.     bne.s    Cryptic_voice2
  625.     move.w    #1,$dff0c4
  626. Cryptic_voice2:
  627.     lea        Cryptic_aud2temp(PC),a6
  628.     cmp.w    #1,14(a6)
  629.     bne.s    Cryptic_voice1
  630.     move.l    10(a6),$dff0b0
  631.     move.w    #1,$dff0b4
  632. Cryptic_voice1:
  633.     lea        Cryptic_aud1temp(PC),a6
  634.     cmp.w    #1,14(a6)
  635.     bne.s    Cryptic_voice0
  636.     move.l    10(a6),$dff0a0
  637.     move.w    #1,$dff0a4
  638. Cryptic_voice0:
  639.     move.l    Cryptic_partnote(PC),d0
  640.     add.l    #$10,d0
  641.     move.l    d0,Cryptic_partnote
  642.     cmp.l    #$400,d0
  643.     bne.s    Cryptic_stop
  644. Cryptic_higher:
  645.     clr.l    Cryptic_partnote
  646.     addq.l    #1,Cryptic_partnrplay
  647.     moveq    #0,d0
  648.     move.w    Cryptic_maxpart(PC),d0
  649.     move.l    Cryptic_partnrplay(PC),d1
  650.     cmp.l    d0,d1
  651.     bne.s    Cryptic_stop
  652.     clr.l    Cryptic_partnrplay
  653.     ;st    Pflag
  654. Cryptic_stop:
  655.     tst.w    Cryptic_status
  656.     beq.s    Cryptic_stop2
  657.     clr.w    Cryptic_status
  658.     bra.s    Cryptic_higher
  659. Cryptic_stop2:
  660.     rts
  661. Cryptic_playit:
  662.     move.l    (a0,d1.l),(a6)
  663.     addq.l    #4,d1
  664.     moveq    #0,d2
  665.     move.b    2(a6),d2
  666.     and.b    #$f0,d2
  667.     lsr.b    #4,d2
  668.     move.b    (a6),d0
  669.     and.b    #$f0,d0
  670.     or.b    d0,d2
  671.     tst.b    d2
  672.     beq.s    Cryptic_nosamplechange
  673.     moveq    #0,d3
  674.     lea    Cryptic_samples(PC),a1
  675.     move.l    d2,d4
  676.     asl.l    #2,d2
  677.     mulu    #$1e,d4
  678.     move.l    (a1,d2),4(a6)
  679.     move.w    (a3,d4.l),8(a6)
  680.     move.w    2(a3,d4.l),18(a6)
  681.     move.w    4(a3,d4.l),d3
  682.     tst.w    d3
  683.     beq.s    Cryptic_displace
  684.     move.l    4(a6),d2
  685.     add.l    d3,d2
  686.     move.l    d2,4(a6)
  687.     move.l    d2,10(a6)
  688.     move.w    6(a3,d4.l),8(a6)
  689.     move.w    6(a3,d4.l),14(a6)
  690.     move.w    18(a6),8(a5)
  691.     bra.s    Cryptic_nosamplechange
  692. Cryptic_displace:
  693.     move.l    4(a6),d2
  694.     add.l    d3,d2
  695.     move.l    d2,10(a6)
  696.     move.w    6(a3,d4.l),14(a6)
  697.     move.w    18(a6),8(a5)
  698. Cryptic_nosamplechange:
  699.     move.w    (a6),d0
  700.     and.w    #$fff,d0
  701.     tst.w    d0
  702.     beq.s    Cryptic_retrout
  703.     move.w    (a6),16(a6)
  704.     move.w    20(a6),$dff096
  705.     move.l    4(a6),(a5)
  706.     move.w    8(a6),4(a5)
  707.     move.w    (a6),d0
  708.     and.w    #$fff,d0
  709.     move.w    d0,6(a5)
  710.     move.w    20(a6),d0
  711.     or.w    d0,Cryptic_dmacon
  712. Cryptic_retrout:
  713.     tst.w    (a6)
  714.     beq.s    Cryptic_nonewper
  715.     move.w    (a6),22(a6)
  716. Cryptic_nonewper:
  717.     move.b    2(a6),d0
  718.     and.b    #$0f,d0
  719.     cmp.b    #$0b,d0
  720.     beq.s    Cryptic_posjmp
  721.     cmp.b    #$0c,d0
  722.     beq.s    Cryptic_setvol
  723.     cmp.b    #$0d,d0
  724.     beq.s    Cryptic_break
  725.     cmp.b    #$0e,d0
  726.     beq.s    Cryptic_setfil
  727.     cmp.b    #$0f,d0
  728.     beq.s    Cryptic_setspeed
  729.     rts
  730. Cryptic_posjmp:
  731.     not.w    Cryptic_status
  732.     moveq    #0,d0
  733.     move.b    3(a6),d0
  734.     subq.b    #1,d0
  735.     move.l    d0,Cryptic_partnrplay
  736.     rts
  737. Cryptic_setvol:
  738.     move.b    3(a6),8(a5)
  739.     rts
  740. Cryptic_break:
  741.     not.w    Cryptic_status
  742.     rts
  743. Cryptic_setfil:
  744.     moveq    #0,d0
  745.     move.b    3(a6),d0
  746.     and.b    #1,d0
  747.     rol.b    #1,d0
  748.     and.b    #$fd,$bfe001
  749.     or.b    d0,$bfe001
  750.     rts
  751. Cryptic_setspeed:
  752.     move.b    3(a6),d0
  753.     and.b    #$0f,d0
  754.     beq.s    Cryptic_back
  755.     clr.w    Cryptic_counter
  756.     move.b    d0,Cryptic_cool+3
  757. Cryptic_back:    rts
  758. Cryptic_aud1temp:
  759.     dcb.w    10,0
  760.     dc.w    1
  761.     dcb.w    2,0
  762. Cryptic_aud2temp:
  763.     dcb.w    10,0
  764.     dc.w    2
  765.     dcb.w    2,0
  766. Cryptic_aud3temp:
  767.     dcb.w    10,0
  768.     dc.w    4
  769.     dcb.w    2,0
  770. Cryptic_aud4temp:
  771.     dcb.w    10,0
  772.     dc.w    8
  773.     dcb.w    2,0
  774. Cryptic_partnote:    dc.l    0
  775. Cryptic_partnrplay:    dc.l    0
  776. Cryptic_counter:    dc.w    0
  777. Cryptic_partpoint:    dc.l    0
  778. Cryptic_samples:    dc.l    0
  779. Cryptic_sample1:    dcb.l    31,0
  780. Cryptic_maxpart:    dc.w    0
  781. Cryptic_dmacon:    dc.w    0
  782. Cryptic_status:    dc.w    0
  783. Cryptic_arpeggio:
  784.     dc.w $0358,$0328,$02fa,$02d0,$02a6,$0280,$025c
  785.     dc.w $023a,$021a,$01fc,$01e0,$01c5,$01ac,$0194,$017d
  786.     dc.w $0168,$0153,$0140,$012e,$011d,$010d,$00fe,$00f0
  787.     dc.w $00e2,$00d6,$00ca,$00be,$00b4,$00aa,$00a0,$0097
  788.     dc.w $008f,$0087,$007f,$0078,$0071,$0000,$0000,$0000
  789.  
  790.             
  791.  
  792. ; ** THE COPPERLIST **
  793.  
  794. OURCOPPER:
  795. sp0lo:    dc.w    spr0ptl,$0000
  796. sp0hi:    dc.w    spr0pth,$0000
  797.         dc.w    bpl1mod,0,bpl2mod,0
  798.         dc.w    diwstrt,$2c81+16,diwstop,$2cc1
  799.         dc.w    bplcon0,$1200,bplcon1,$0000
  800.         dc.w    ddfstrt,$38,ddfstop,$d0
  801.         dc.w    color00,$000,color01,$094
  802.         dc.w    color16,$aaa,color17,$aaa,color18,$aaa
  803.         dc.w    color19,$aaa,color20,$aaa
  804. bp1lo:    dc.w    bpl1ptl,$0000
  805. bp1hi:    dc.w    bpl1pth,$0000
  806.         wait    $2c09,$fffe
  807.         dc.w    color01,$f00
  808.         wait    $2e09,$fffe
  809.         dc.w    color01,$f11
  810.         wait    $3009,$fffe
  811.         dc.w    color01,$f00
  812.         wait    $3209,$fffe
  813.         dc.w    color01,$f11
  814.         wait    $3409,$fffe
  815.         dc.w    color01,$f22
  816.         wait    $3609,$fffe
  817.         dc.w    color01,$f33
  818.         wait    $389,$fffe
  819.         dc.w    color01,$f44
  820.         wait    $3a09,$fffe
  821.         dc.w    color01,$f55
  822.         wait    $3c09,$fffe
  823.         dc.w    color01,$f66
  824.         wait    $3e09,$fffe
  825.         dc.w    color01,$f77
  826.         wait    $4009,$fffe
  827.         dc.w    color01,$f88
  828.         wait    $4209,$fffe
  829.         dc.w    color01,$f99
  830.         wait    $4409,$fffe
  831.         dc.w    color01,$faa
  832.         wait    $4609,$fffe
  833.         dc.w    color01,$fbb
  834.         wait    $4809,$fffe
  835.         dc.w    color01,$fcc
  836.         wait    $4a09,$fffe
  837.         dc.w    color01,$fdd
  838.         wait    $4c09,$fffe
  839.         dc.w    color01,$fee
  840.         wait    $4e09,$fffe
  841.         dc.w    color01,$fff
  842.         wait    $5109,$fffe
  843.         dc.w    color01,$eef
  844.         wait    $5309,$fffe
  845.         dc.w    color01,$ddf
  846.         wait    $5509,$fffe
  847.         dc.w    color01,$ccf
  848.         wait    $5709,$fffe
  849.         dc.w    color01,$bbf
  850.         wait    $5909,$fffe
  851.         dc.w    color01,$aaf
  852.         wait    $5b09,$fffe
  853.         dc.w    color01,$99f
  854.         wait    $5d09,$fffe
  855.         dc.w    color01,$88f
  856.         wait    $5f09,$fffe
  857.         dc.w    color01,$77f
  858.         wait    $6109,$fffe
  859.         dc.w    color01,$66f
  860.         wait    $6309,$fffe
  861.         dc.w    color01,$55f
  862.         wait    $6509,$fffe
  863.         dc.w    color01,$44f
  864.         wait    $6709,$fffe
  865.         dc.w    color01,$33f
  866.         wait    $6909,$fffe
  867.         dc.w    color01,$22f
  868.         wait    $6a09,$fffe
  869.         dc.w    color01,$11f
  870.         wait    $6c09,$fffe
  871.         dc.w    color01,$00f
  872.         wait    $6e09,$fffe
  873.         dc.w    color01,$11f
  874.         wait    $7109,$fffe
  875.         dc.w    color01,$22f
  876.         wait    $7309,$fffe
  877.         dc.w    color01,$33f
  878.         wait    $7509,$fffe
  879.         dc.w    color01,$44f
  880.         wait    $7709,$fffe
  881.         dc.w    color01,$55f
  882.         wait    $7909,$fffe
  883.         dc.w    color01,$66f
  884.         wait    $7a09,$fffe
  885.         dc.w    color01,$77f
  886.         wait    $7c09,$fffe
  887.         dc.w    color01,$88f
  888.         wait    $7e09,$fffe
  889.         dc.w    color01,$99f
  890.         wait    $8009,$fffe
  891.         dc.w    color01,$aaf
  892.         wait    $8209,$fffe
  893.         dc.w    color01,$bbf
  894.         wait    $8409,$fffe
  895.         dc.w    color01,$ccf
  896.         wait    $8609,$fffe
  897.         dc.w    color01,$ddf
  898.         wait    $8809,$fffe
  899.         dc.w    color01,$eef
  900.         wait    $8a09,$fffe
  901.         dc.w    color01,$fff
  902.         wait    $8c09,$fffe
  903.         dc.w    color01,$fee
  904.         wait    $8e09,$fffe
  905.         dc.w    color01,$fdd
  906.         wait    $9109,$fffe
  907.         dc.w    color01,$fcc
  908.         wait    $9309,$fffe
  909.         dc.w    color01,$fbb
  910.         wait    $9509,$fffe
  911.         dc.w    color01,$faa
  912.         wait    $9709,$fffe
  913.         wait    $9909,$fffe
  914.         dc.w    color01,$f99
  915.         wait    $9b09,$fffe
  916.         dc.w    color01,$f88
  917.         wait    $9d09,$fffe
  918.         dc.w    color01,$f77
  919.         wait    $9f09,$fffe
  920.         dc.w    color01,$f66
  921.         wait    $a109,$fffe
  922.         set_pal
  923.         wait    $0309,$fffe
  924. eq1:    dc.w    color00,$f00
  925.         wait    $0809,$fffe
  926.         dc.w    color00,$000
  927.         wait    $0c09,$fffe
  928. eq2:    dc.w    color00,$ff0
  929.         wait    $1009,$fffe
  930.         dc.w    color00,$000
  931.         wait    $1409,$fffe
  932. eq3:    dc.w    color00,$00f
  933.         wait    $1809,$fffe
  934.         dc.w    color00,$000
  935.         wait    $1b09,$fffe
  936. eq4:    dc.w    color00,$0f0
  937.         wait    $1f09,$fffe
  938.         dc.w    color00,$000
  939.         wait    $2309,$fffe
  940.         end_copper
  941.         
  942.  
  943. ;LOCAL CONSTANTS
  944.  
  945. WBCOPPER:        DC.L    0
  946. GFXLIB:            DC.B     "graphics.library",0
  947. GFXBASE:        DC.L    0
  948. systemints:        dc.l    0
  949. scroll_offset:    dc.l    0
  950. screenx:        dc.l    picture
  951. letter:            dc.b    0
  952. acurent:        dc.l    message
  953. val:            dc.l    0
  954. lo_amplitude:    dc.l    1
  955. hi_amplitude:    dc.l    2
  956. Tango            Dc.l    0
  957. sin_screen:        Dc.l    SinePlane
  958. stopper:        dc.l    0
  959.  
  960.  
  961. ;BINARY FILES TO BE INCLUDED
  962.     EVEN
  963. picture    
  964.     dcb.b    10240,0
  965. SinePlane
  966.     dcb.b    10240,0
  967.     dcb.b    10240,0
  968. font
  969.     incbin    df0:neatfont.bin
  970. sprite:
  971.     include    df0:sprite.list
  972. Cryptic_data:
  973.     incbin    df0:mod.count
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.     
  981.     
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.     
  990.     
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.